package com.guli.cart.config;
/*
 * @Author 罗俊
 * @date 2020/11/8 - 9:51 上午
 *
 */

import com.guli.cart.interceptor.CartInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class GuliWebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        // 注册拦截器
        CartInterceptor cartInterceptor = new CartInterceptor();

        registry.addInterceptor(cartInterceptor);
    }
}
